const repl = require('repl');
const msg1 = 'message1';
const msg2 = 'message2';
const msg3 = 'message3';

repl.start('> ').context.a1 = msg1;